package com.evil.common.file.constant;

import cn.hutool.core.util.StrUtil;

/**
 * POI常量
 *
 * @author liyang
 * @date 2022-08-08 00:00
 */
public interface PoiConstant {

    /**
     * 文本类型
     */
    String UPLOAD_TXT_TYPE = "text/plain";

    /**
     * 头像上传类型
     */
    String UPLOAD_USER_PORTRAIT_TYPE = "image/jpeg,image/gif,image/png,image/bmp";

    /**
     * 视频类型
     */
    String UPLOAD_VIDEO_TYPE = "video/mp4,video/mp3,video/avi";

    /**
     * 音频类型
     */
    String UPLOAD_AUDIO_TYPE = "audio/*";

    /**
     * word内容类型
     */
    String WORD_CONTENT_TYPE = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";

    /**
     * word文档类型
     */
    String UPLOAD_WORD_TYPE = StrUtil.join(StrUtil.COMMA, WORD_CONTENT_TYPE, "application/msword");

    /**
     * excel03内容类型
     */
    String EXCEL_03_CONTENT_TYPE = "application/vnd.ms-excel";

    /**
     * excel07内容类型
     */
    String EXCEL_07_CONTENT_TYPE = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";

    /**
     * excel文档类型
     */
    String UPLOAD_EXCEL_TYPE = StrUtil.join(StrUtil.COMMA, EXCEL_03_CONTENT_TYPE, EXCEL_07_CONTENT_TYPE, "application/x-xls, application/x-xlsx");

    /**
     * pdf内容类型
     */
    String PDF_CONTENT_TYPE = "application/pdf";

    /**
     * ppt内容类型
     */
    String PTT_CONTENT_TYPE = "application/vnd.ms-powerpoint";

    /**
     * zip文件
     */
    String ZIP_FILE_CONTENT_TYPE = "application/zip";

    /**
     * rar文件
     */
    String RAR_FILE_CONTENT_TYPE = "application/x-rar";

    /**
     * 其他文件
     */
    String FILE_CONTENT_TYPE = "application/octet-stream";
}
